
#include <string.h>
#include "fun.h"
//#include "ReaderID.h"
#include "Debug.h"
#include "BSP.h"
//	#include "Driver.h"
#include "BSP_Timer.h"
#include "Timer.h"

#include "FreeRTOS.h"
#include "Task.h"
#include "Timers.h"
#include "version.h"
#include "task_config.h"

#include "id_card.h"
#include "HIDProx.h"

#include <Reader/ReaderLF.h>


static void fun_init(void)
{
	Reader_LF_Init();
}

void fun_task(void *param)
{
	fun_init();
	while(1)
	{
		// vTaskDelay(5);

		Reader_LF_Service();
	}
}

static void reset_cb(xTimerHandle timer)
{
	NVIC_SystemReset();
}

void fun_delay_reset(uint32_t time)
{
	xTimerStart( xTimerCreate("rst", pdMS_TO_TICKS(time), pdFALSE, NULL, reset_cb), portMAX_DELAY);
}

